<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" href="CSS/index-common.css">
		<link rel="stylesheet" href="CSS/index-global.css">
		<script type="text/javascript" src="JS/common.js"></script>
		<script type="text/javascript" src="JS/Index/base-all.js"></script>
		<script type="text/javascript" src="JS/Index/common-header.js"></script>
	</head>

	<body>
	<div data-spm="2">
			<div class="ali-common-header">
				<div class="ali-common-header-inner common-header-clearfix">
					<div class="activity item pull-left">
						<div id="J-ali-activity-img">
							<div style="margin-top: 6px;"><span style="color:white;font-size: 18px;"><img src="images/login/login_logo.png" width="240px" height="55px"/></span></div>
						</div>

					</div>
					<!-- 导航菜单 -->
					<div id="accord"></div>
					<div style="float:right;margin-top: 20px;color:white;font-size: 13px;">
						<span><a href="#" id="logout" style="color:#4BAE34">注销</a></span>
						<span><a href="#" style="margin-left: 10px;color:#4BAE34">设置</a></span>
					</div>
				</div>
			</div>
		</div>
		<iframe id="ifrmList" src="content.html" frameborder="0" width="100%" height="700px""></iframe>
	    <div id="gsFooter">
			<div class="footer" style="letter-spacing: 3px;">版权所有:绵阳北电世纪科技有限公司</div>
		</div>
	</body>
	<script type="text/javascript">
		var _menus = {
			basic: [{
				"menuid": "01",
				"menuname": "物流管理",
				"menus": [{
					"menuid": "011",
					"menuname": "内部管理",
					"submenus": [{
						"menuid": "0111",
						"menuname": "订单管理",
						"url": "UI/LOGISTICS/OrderManagement/OriginalOrderAddStep.html"
					}, {
						"menuid": "0112",
						"menuname": "物流基础信息",
						"url": "UI/LOGISTICS/BasicInformation/BasicInformation.html"
					}, {
						"menuid": "0113",
						"menuname": "采购单分解",
						"url": "UI/LOGISTICS/PurchaseOrderCreate/PurchaseOrderBreakList.html"
					}, {
						"menuid": "0114",
						"menuname": "采购单",
						"url": "UI/LOGISTICS/PurchaseOrderCreate/PurchaseOrderList.html"
					}, {
						"menuid": "0115",
						"menuname": "入库计划表",
						"url": "UI/LOGISTICS/WarehouseScheduleCreate/WarehouseScheduleSearch.html"
					}]
				}, {
					"menuid": "012",
					"menuname": "外部管理",
					"submenus": [{
						"menuid": "0121",
						"menuname": "销售单",
						"url": "UI/LOGISTICS/SalesOrderCreate/SalesOrderSearch.html"
					}, {
						'menuid': "0122",
						"menuname": "配送管理",
						"icon": "icon-nav",
						"url": "UI/LOGISTICS/DeliverManagement/DeliverManagementListSelect.html"
					}, {
						'menuid': "0123",
						"menuname": "销售结算",
						"icon": "icon-nav",
						"url": "UI/LOGISTICS/SalesSettlement/SalesSettlementSearch.html"
					}]
				}, {
					"menuid": "013",
					"menuname": "日志",
					"submenus": [{
						'menuid': "0131",
						"menuname": "订单日志",
						"icon": "icon-nav",
						"url": "UI/LOGISTICS/ExecuteOrder/ExecuteOrderList.html"
					}, {
						'menuid': "0132",
						"menuname": "修改记录",
						"icon": "icon-nav",
						"url": "UI/LOGISTICS/Log/LogSearch.html"
					}]
				}]
			},{
				"menuid":"02",
				"menuname":"气调库",
				"menus":[{
					"menuid":"021",
					"menuname":"基础信息",
					"submenus":[{
						"menuid":"0211",
						"menuname":"租户管理",
						"icon":"icon-nav",
						"url":"UI/FrozenCave/BusinessInfomation/BusinessInformationSearch.html"
					
					},{
						"menuid":"0212",
						"menuname":"库房管理",
						"icon":"icon-nav",
						"url":"UI/FrozenCave/Warehouse/WarehouseList.html"
					},{
						"menuid":"0213",
						"menuname":"气调库基础信息",
						"icon":"icon-nav",
						"url":"UI/FrozenCave/ControlBasicInfomation/ControlBasicInformation.html"
					}]
				},{
					"menuid":"022",
					"menuname":"库管单据",
					"submenus":[{
						"menuid":"0221",
						"menuname":"入库单据",
						"icon":"icon-nav",
						"url":"UI/FrozenCave/BusinessInfomationStorageWater/BusinessInformationStorageWater.html"
					},{
						"menuid":"0222",
						"menuname":"出库单据",
						"icon":"icon-nav",
						"url":"UI/FrozenCave/BusinessInfomationOutWarehouseWater/BusinessInformationOutWarehouseWater.html"
					},{
						"menuid":"0223",
						"menuname":"包库管理",
						"icon":"icon-nav",
						"url":"UI/FrozenCave/BusinessInfomationPackageLibrary/BusinessInformationPackageLibrary.html"
					},{
						"menuid":"0224",
						"menuname":"移库管理",
						"icon":"icon-nav",
						"url":"UI/FrozenCave/BusinessInfomationTransfer/BusinessInformationTransferListSelect.html"
					}]
				},{
					"menuid":"023",
					"menuname":"库管单据",
					"submenus":[{
						"menuid":"0231",
						"menuname":"库存管理",
						"icon":"icon-nav",
						"url":"UI/FrozenCave/BusinessInfomationStorageWater/BusinessInformationStorageWater.html"
					},{
						"menuid":"0232",
						"menuname":"冲销帐",
						"icon":"icon-nav",
						"url":""
					}]
				 }]
				},{
					"menuid":"03",
					"menuname":"市场管理",
					"menus":[{
						"menuid":"031",
						"menuname":"商户",
						"submenus":[{
							"menuid":"0311",
							"menuname":"固定商户管理",
							"icon":"icon-nav",
							"url":"UI/Market/BusinessInformation/BusinessInformationAdd.html"
						},{
							"menuid":"0312",
							"menuname":"小商户管理",
							"icon":"icon-nav",
							"url":"UI/Market/SmallBusinessInformation/SmallBusinessInformationSearch.html"
						},{
							"menuid":"0313",
							"menuname":"摊位管理",
							"icon":"icon-nav",
							"url":"UI/Market/BoothManagement/BoothManagementSearch.html"
						},{
							"menuid":"0314",
							"menuname":"合同管理",
							"icon":"icon-nav",
							"url":"UI/Market/BIContract/BIContractSearch.html"
						},{
							"menuid":"0315",
							"menuname":"收费管理",
							"icon":"icon-nav",
							"url":"UI/Market/Receipt/receiptSearch.html"
						}]
					},{
						"menuid":"032",
						"menuname":"事件",
						"submenus":[{
							"menuid":"0321",
							"menuname":"设备管理",
							"icon":"icon-nav",
							"url":"UI/Market/EquipmentManagement/EquipmentManagementSearch.html"
						},{
							"menuid":"0322",
							"menuname":"事件管理",
							"icon":"icon-nav",
							"url":"UI/Market/EventManagement/EventManagement.html"
						},{
							"menuid":"0323",
							"menuname":"基础信息",
							"icon":"icon-nav",
							"url":"UI/Market/DictData/DictDataAdd.html"
						}]
					},{
						"menuid":"033",
						"menuname":"安全",
						"submenus":[{
							"menuid":"0331",
							"menuname":"市场地图",
							"icon":"icon-nav",
							"url":"#"
						},{
							"menuid":"0332",
							"menuname":"关怀系统",
							"icon":"icon-nav",
							"url":"UI/Market/SMS/SMSIndex.html"
						},{
							"menuid":"0333",
							"menuname":"食品安全",
							"icon":"icon-nav",
							"url":"#"
						}]
					}]
				}]
		};
		CreateAccordion();

		function CreateAccordion() {
			var content = "";
			content = "<ul class='menu item pull-left' id='J_common_header_menu' data-spm='201'>";
			for(var i = 0; i < _menus.basic.length; i++) {
				var _menuData = _menus.basic[i];
				
				// 第一级菜单
				content = content + "<li class='top-menu-item' has-dropdown='true' menu-type='training' data-spm-click=''><a class='menu-hd'>" + _menuData.menuname + "</a><div class='menu-dropdown solutions training-bg'><div class='menu-dropdown-inner module-padding training-inner common-header-clearfix'>";
				for(var j = 0; j < _menuData.menus.length; j++) {
					content = content + "<div class='module-wrap' style='width:200px'><div class='module-hd'>" + _menuData.menus[j].menuname + "</div><div class='module-bd'>";
					var _submenuData = _menuData.menus[j];
					for(var m = 0; m < _submenuData.submenus.length; m++) {
						content = content + "<a name='" + _submenuData.submenus[m].menuname + "'rel='" + _submenuData.submenus[m].url + "' onclick='addnav(this.rel,this.name)'> " + _submenuData.submenus[m].menuname + " </a>";
					}
					content = content + "</div></div>";
				}
			   content = content + "</li>";
			  }
			content = content + "</ul>";
			$("#accord").append(content);
		}

		function addnav(_url, _name) {
			AddTabIn(_name, $("#ifrmList")[0].contentWindow.$('#tabs'), _url);
			//			$("#ifrmList")[0].contentWindow.$('#dg')

		}

		function reinitIframe() {
			var iframe = document.getElementById("ifrmList");
			try {
				var bHeight = iframe.contentWindow.document.body.scrollHeight;
				var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
				var height = Math.max(bHeight, dHeight);
				iframe.height = height;
			} catch(ex) {}
		}

		var timer1 = window.setInterval("reinitIframe()", 500); //定时开始  

		function reinitIframeEND() {
			var iframe = document.getElementById("ifrmList");
			try {
				var bHeight = iframe.contentWindow.document.body.scrollHeight;
				var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
				var height = Math.max(bHeight, dHeight);
				iframe.height = height;
			} catch(ex) {}
			// 停止定时  
			window.clearInterval(timer1);

		}
		$(function() {
			$("#logout").click(function() {
				localStorage['loginUser'] = "";
				window.location = "UI/Login/login.html";
			});

		});
	</script>

</html>